package com.ztao.controller;
import com.heima.model.common.apArticle.dto.ArticleInfoDto;
import com.heima.model.common.dtos.ResponseResult;
import com.ztao.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/article")
public class ArticleInfoController {
 
    @Resource
    private ArticleService apArticleService;
 
    /**
     * 加载文章详情，数据回显
     * @param dto
     * @return
     */
    @PostMapping("/load_article_behavior")
    public ResponseResult loadArticleBehavior(@RequestBody ArticleInfoDto dto) {
        return apArticleService.loadArticleBehavior(dto);
    }
}